<?php
namespace app\websocket\listener;

class SwooleWebsocketClose{
    public function handle($request)
    {
        $sw = app("think\swoole\Websocket");
        $sender = $sw->getSender();
        echo "Close connection from {$sender}\n";
    }
}